﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using Model;

namespace Presenter
{
    public class Student
    {
        IStudentView _IView;
        DataTable _Model;
     
        public Student( IStudentView iview)
        {
            _IView = iview;
            _Model = GetStudent();
       
        }
        public void BindingdataForGridView()
        {
            _IView.GridBinding(_Model);
        }
      
        public void delete()
        {
            _IView.dete(_Model);
        }
        public DataTable GetStudent()
        {
          return StudentDAO.GetData();
        }

        public void Update()
        {
           DataTable dtStudent = StudentDAO.GetData();
           StudentDAO.updateData(_Model);
           
        }
        public void addData()
        {
            _IView.add(_Model);
        }
        public void returnDataStudent()
        {
            _IView.returnData(_Model);
        }
    }
}
